#ifndef _SOCKETINFO_H_
#define _SOCKETINFO_H_

#include <stdlib.h>

#include <event.h>

#define BUFFER_LENGTH 1024

struct connection {
	int fd;
	unsigned long long id;
	struct bufferevent * bev;
	union {
		void * ctx;
		struct connection * next;
	};
};

struct connection * alloc_connection(struct event_base * base, int fd);
void release_connection(struct connection * conn);
#endif
